-- GENERATED SPELL FOR [Draaca Longtail] --


function spell0_22396(pUnit, Event) --@Cutdown,n/a--
pUnit:FullCastSpellOnTarget(32009,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22396', 520, 1)
end

function spell1_22396(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_22396', 650, 1)
end

function Sorts_22396(pUnit, Event)
local choix_sorts_22396 = math.random(0, 1)
if choix_sorts_22396 == 0 then
pUnit:RegisterEvent('spell0_22396', 1, 1)
end
if choix_sorts_22396 == 1 then
pUnit:RegisterEvent('spell1_22396', 1, 1)
end
end

function mob22396_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22396', math.random(1500, 3000), 1)
end

function mob22396_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22396_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22396_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22396, 1, 'mob22396_Action')
RegisterUnitEvent(22396, 2, 'mob22396_Leave')
RegisterUnitEvent(22396, 3, 'mob22396_Kill')
RegisterUnitEvent(22396, 4, 'mob22396_Die')
